//根级别的state
export const state = {
    //用户信息
    //将本地储存和vuex同步
    user:localStorage.getItem("isLogin")?JSON.parse(localStorage.getItem("isLogin")):{}
}
//根级别的getters
export const getters = {
    //导出用户信息给组件
    user(state){
        return state.user
    }
}
//根级别的mutations
export const mutations = {
    //修改用户信息
    changeUser(state,user){
        state.user = user
    }
}